package com.example.chat.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author ：YaXing
 * @description： 职位表
 * @date ：2022/3/21 17:11
 */
@Entity
@Table(name = "VDOA003_POSITION")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@DynamicInsert
@DynamicUpdate
@NoArgsConstructor
public class Position extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 5438162779337762588L;
    @Id
    @Column(name = "DOA003_ID", length = 50)
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    @GeneratedValue(generator = "uuid")
    private String id;

    /**
     * 职位名称
     */
    @Column(name = "DOA003_NAME", length = 50)
    private String name;

    /**
     * 是否已删除
     */
    @Column(name = "DOA003_DELETED")
    private Boolean deleted = false;
}
